package io.xxx.mario.room;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.cursor.Cursor;

import java.util.List;

@Mapper
public interface RoomMapper extends BaseMapper<Room> {

    void updateGroup(@Param("roomGroupId") Long roomGroupId, @Param("list") List<Long> roomIds);

    List<Room> findByGroupIds(@Param("list") List<Long> roomGroupIds);

    List<Room> findArrivedTaskRooms(
            @Param("taskId") Long taskId,
            @Param("limit") int limit
    );

    Cursor<Room> findCursorByTaskId(@Param("taskId") Long taskId);
}
